Skip to content

Fix confusing log message when checking present hypervisor #422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 17, 2025

Conversation

ludfjig
Copy link
Contributor

@ludfjig ludfjig commented Apr 17, 2025

When checking if a specific hypervisor is present using for example kvm::is_hypervisor_present, and the hypervisor is not present, a log message is printed with the word 'Error' in it, which was confusing since it's not actually an error.

The second commit does a slight cleanup by switching to Mshv::new() to avoid having to manually close the fd with raw libc calls.

Closes #379

@ludfjig ludfjig changed the title Removes the word 'Error' from non-error log messages when checking if… Fix confusing log message Apr 17, 2025
@ludfjig ludfjig marked this pull request as ready for review April 17, 2025 16:50
@ludfjig ludfjig added the kind/bugfix For PRs that fix bugs label Apr 17, 2025
… specific hypervisors exist. This caused confusion if both kvm and mshv cargo features were enabled

Signed-off-by: Ludvig Liljenberg <[email protected]>
…y needing to close fd

Signed-off-by: Ludvig Liljenberg <[email protected]>
@ludfjig ludfjig changed the title Fix confusing log message Fix confusing log message when checking present hypervisor Apr 17, 2025
@ludfjig ludfjig enabled auto-merge (squash) April 17, 2025 17:44
@ludfjig ludfjig merged commit 1d8b289 into hyperlight-dev:main Apr 17, 2025
39 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bugfix For PRs that fix bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect log level for failing to create driver when multiple cargo features are enabled.
2 participants